'Having a laugh' is a remark used to describe a type of comic behaviour that is
facetious, ironic or sarcastic. The person may be fooled into believing the other person is being serious, when in fact he's just 'having a laugh'. It's harmless fun.
In some cases it's synonymous with
mockery.
But like most things British its subtle and understated.
It's also
lighthearted in nature